package com.csun.cmny.provider.model.dto.address;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

@Data
public class AddressSaveDto {



    //百度地图经度
    @NotNull(message = "{address.longitude.null}")
    private BigDecimal longitude;


    //百度地图纬度
    @NotNull(message = "{address.latitude.null}")
    private BigDecimal latitude;

    //百度地图定位地址
    private String locateAddress;

  //详细地址
    @NotEmpty(message = "{address.detailedAddress.null}")
    private String detailedAddress;

    //联系人
    @NotEmpty(message = "{address.contacts.null}")
    private String contacts;

    //性别 0-先生 1-女士
    @NotNull(message = "{address.gender.null}")
    private Integer gender;

    //手机号
    @NotEmpty(message = "{address.phone.null}")
    @Pattern(regexp = "^((\\+86)|(86))?(13|15|16|17|18|19)\\d{9}$",
            message = "{address.phone.error}")
    private String phone;

    //标签 0-家 1-公司 3-社区
    @NotNull(message = "{address.label.null}")
    private Integer label;

}
